<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:ajax="http://www.apusic.com/jsf/ajax" xmlns:biz="http://www.kingdee.com/jsf/biz" xmlns="http://www.w3.org/1999/xhtml" xmlns:om="http://www.apusic.com/jsf/misc" xmlns:kd="http://www.kingdee.com/jsf/component" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:layout="http://www.apusic.com/jsf/layout" xmlns:h="http://java.sun.com/jsf/html" xmlns:w="http://www.apusic.com/jsf/widget" renderKitId="AJAX">
	<kd />
	<ui:composition template="/custom/aoyuan/aytime/bizbill/edit-template.xhtml">	
		<ui:define name="resBefore">
			<f:loadBundle basename="com.kingdee.eas.custom.aoyuan.aytime.bizbill.web.OTBillEditUIBean" var="extraMsgs" />			
		</ui:define>		
		<ui:define name="resAfter">
			<script type="text/javascript" src="../../../../resource/common.js"></script>		
			<script type="text/javascript" src="js/oTBillEdit.js"></script>
		</ui:define>
		<ui:define name="toolbar">
			<div class="titlePanel">
			<div style="margin-top: 10px">		
				<h:panelGrid columns="13">	
					<w:button id="btnMySave" immediate="true" value="#{extraMsgs['btnSave.label']}" onclick="btnMySave();" />
					<w:button id="btnSave" jsvar="btnSave" style="display:none;" label="#{extraMsgs['btnSave.label']}" actionBinding="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.saveAction}" />
					<w:button id="btnMySumit" immediate="true" value="#{extraMsgs['btnSubmit.label']}" onclick="btnMySumit();" />
					<w:button id="btnSubmit" jsvar="btnSubmit" style="display:none;" label="#{extraMsgs['btnSubmit.label']}" actionBinding="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.submitAction}" />
					<w:button id="btnExit" label="#{extraMsgs['btnExit.label']}" actionBinding="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.exitAction}" />				
					<w:button id="btnAuditDetail"  label="审批明细" jsvar="btnAuditDetail" onclick="showProcessDiagramWin();" />	
				</h:panelGrid>	
			</div>
			<div class="solidLine" />
			</div>
		</ui:define>	
		<ui:define name="message">
			<kd:msgArea style=""></kd:msgArea>
		</ui:define>	
		<ui:define name="header">
			<layout:panelGrid columns="3" width="100%">	
				<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contNumber" width="260" height="19" caption="#{extraMsgs['contNumber.caption']}" lineWidth="100" childItem="txtNumber" jsvar="contNumber">
						<w:textField id="txtNumber" jsvar="txtNumber" disabled="true" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.number}" />
					</kd:labelContainer>					
				</layout:cell>	
				<!--<layout:cell colspan="1" rowspan="1">		
					<kd:labelContainer id="contstatus" width="260" height="19" caption="#{extraMsgs['contstatus.caption']}" lineWidth="100" childItem="status" jsvar="contstatus">
						<kd:enumCombo id="status" disabled="true" type="com.kingdee.eas.custom.aoyuan.aytime.AYAttenBillStatusEnum" jsvar="status" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.status}" />
					</kd:labelContainer>	
				</layout:cell>-->	
				<layout:cell colspan="1" rowspan="1">		
					<kd:labelContainer id="contBizDate" width="260" height="19" caption="#{extraMsgs['contBizDate.caption']}" lineWidth="100" childItem="txtBizDate" jsvar="contBizDate">
						<w:dateField id="txtBizDate" jsvar="txtBizDate" disabled="true" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.bizDate}">
							<kd:convertAllDate pattern="yyyy-MM-dd" castType="java.sql.Date" />
						</w:dateField>
					</kd:labelContainer>
				</layout:cell>					
				<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contEmp" width="260" height="19" caption="#{extraMsgs['contEmp.caption']}" lineWidth="100" childItem="prmtEmp" jsvar="contEmp">
						<kd:promptBox id="prmtEmp" disabled="true" queryInfo="com.kingdee.eas.custom.aoyuan.aytime.basedata.app.PersonHRQuery" diaplayFormat="$name$" editFormat="$number$" jsvar="prmtEmp" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.emp}" />
					</kd:labelContainer>	
				</layout:cell>	
				<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contdept" width="260" height="19" caption="#{extraMsgs['contdept.caption']}" lineWidth="100" childItem="prmtdept" jsvar="contdept">
						<kd:promptBox id="prmtdept" queryInfo="com.kingdee.eas.basedata.org.app.AdminItemQuery" diaplayFormat="$name$" editFormat="$number$" commitFormat="$number$" jsvar="prmtdept" />
					</kd:labelContainer>	
				</layout:cell>		
				<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contposition" width="260" height="19" caption="#{extraMsgs['contposition.caption']}" lineWidth="100" childItem="prmtposition" jsvar="contposition">
						<kd:promptBox id="prmtposition" queryInfo="com.kingdee.eas.basedata.org.app.PositionQuery" diaplayFormat="$name$" editFormat="$number$" commitFormat="$number$" jsvar="prmtposition" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.position}" />
					</kd:labelContainer>
				</layout:cell>	
				<!--<layout:cell colspan="1" rowspan="1">
					<kd:labelContainer id="contremark" width="260" height="19" caption="备注" lineWidth="100" childItem="txtremark" jsvar="contremark">
						<w:textField id="txtremark" jsvar="txtremark" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.Remark}" />
					</kd:labelContainer>
				</layout:cell>-->
				<layout:cell colspan="1" rowspan="1">			
					<kd:labelContainer id="fid"  visible="true" width="270" caption="id" lineWidth="80" style="display:none;">
						<w:textField id="txtfid" disabled="true" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.id}" jsvar="txtfid" />
					</kd:labelContainer>
				</layout:cell>					
			</layout:panelGrid>		
			<div style='margin-top:20px;'>
				<div style='margin-left:20px;'>
					<!--
					<span ><font style='font-weight:bold ;margin-right:15px;'>目前累计加班剩余 : 工作日加班:</font></span>
					<span>#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.otBalanceInfo.normalOT}</span>
					<span ><font style='font-weight:bold;margin-left:10px;margin-right:10px;'>周末日加班:</font></span>
					<span>#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.otBalanceInfo.weekenOT}</span>
					<span ><font style='font-weight:bold;margin-left:10px;margin-right:10px;'>节假日日加班:</font></span>
					<span>#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.otBalanceInfo.holidayOT}</span>
					<span ><font style='font-weight:bold;margin-left:10px;margin-right:10px;'>累计使用情况:</font></span>
					<span>#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.otBalanceInfo.totaluse}</span>
					-->
					<span ><font style='font-weight:bold ;color:red; margin-right:15px;'>注意：<br/> 1、申请加班时，如需计加班费，“加班处理方式”请直接选择“计加班费”，不需要再填“请假/调休/公出”单做申请；<br/>2、如果加班用于调休，“加班处理方式”请选择“调休”，实际调休时再到“请假/调休/公出”单做申请。</font></span>
				</div>  				
            </div>	
		</ui:define>
		<ui:define name="entry">
			<layout:panelGrid  columns="4" width="100%">	
				<layout:cell  colspan="1" rowspan="1">	
					<div style="clear: left; float: right">
						<h:commandLink id="appendRow" immediate="true"
						    disabled="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.isDisabledByState('entryRowButton')}"
							action="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.oTBillEntryBean_apendRow}">
								<img src="#{skin.getSkinReourceURL('/widget/images/table1_button_add.gif')}" />
						</h:commandLink>
						<span/>
						<h:commandLink id="removeRow" immediate="true"
							disabled="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.isDisabledByState('entryRowButton')}"
							action="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.oTBillEntryBean_removeRow}">
								<img src="#{skin.getSkinReourceURL('/widget/images/table1_button_delete.gif')}" />
						</h:commandLink>					
					</div>	
			    	<div id ="entryDiv" style="clear: both;" >
						<w:editDataGrid id="editGrid" clicksToEdit="1" style="overflow-x:auto;overflow-y:hidden;" height="300" binding="#{custom.aoyuan.aytime.bizbill.OTBillEntryBean.editGrid}" value="#{custom.aoyuan.aytime.bizbill.OTBillEntryBean.listModel}" var="data" showRowNumber="true" sync="true" align="left" jsvar="editGrid">
							<w:idColumn id="id" header="id" width="100" idColumn="true" hidden="true" value="#{data.id}" align="left" />
								<w:outputColumn id="OTDate" header="#{extraMsgs['OTDateColumn.header']}" width="100" value="#{data.OTDate}" align="left">
									<w:dateField id="OTDateEditor">
										<kd:convertAllDate pattern="yyyy-MM-dd" castType="java.sql.Date" />
									</w:dateField>
								</w:outputColumn>
								<w:outputColumn id="otType" header="#{extraMsgs['otTypeColumn.header']}" width="100" converter="enumsConverter" value="#{data.otType}" align="left">
									<kd:enumCombo id="otTypeEditor" type="com.kingdee.eas.custom.aoyuan.aytime.OTTypeEnum" />
								</w:outputColumn>	
								<w:outputColumn id="otDeal" header="加班处理方式" width="100" converter="enumsConverter" value="#{data.otDeal}" align="left">
									<kd:enumCombo id="otDealEditor" type="com.kingdee.eas.custom.aoyuan.aytime.OTDealTypeEnum" />
								</w:outputColumn>										
								<w:outputColumn id="startTime" header="#{extraMsgs['StartTimeColumn.header']}" width="100" value="#{data.startTime}" align="left">
									<w:timeField id="StartTimeEditor" format="G:i:s" increment="30" >
										<kd:convertAllDate pattern="HH:mm:ss" castType="java.sql.Time" />
									</w:timeField>
								</w:outputColumn>
								<w:outputColumn id="endTime" header="#{extraMsgs['EndTimeColumn.header']}" width="100" value="#{data.endTime}" align="left">
									<w:timeField id="EndTimeEditor" format="G:i:s" increment="30" >
										<kd:convertAllDate pattern="HH:mm:ss" castType="java.sql.Time" />
									</w:timeField>
								</w:outputColumn>
								<w:outputColumn id="totalHour" header="#{extraMsgs['totalHourColumn.header']}" width="100" value="#{data.totalHour}" align="left">
									<w:numberField id="totalHourEditor" />
								</w:outputColumn>
								<w:outputColumn id="address" header="加班地点" width="100" value="#{data.address}" align="left">
									<w:textField id="addressEditor" />
								</w:outputColumn>								
								<w:outputColumn id="remark" header="加班内容" width="100" value="#{data.remark}" align="left">
									<w:textField id="remarkEditor" />
								</w:outputColumn>
						</w:editDataGrid>				
					</div>					
				</layout:cell>					
			</layout:panelGrid>				
		</ui:define>
	    <ui:define name="bottom">	
			<layout:panelGrid  columns="3" width="100%">
				<layout:cell  colspan="1" rowspan="1">	
					<kd:labelContainer id="contCreator" width="260" disabled="false" caption="创建人" lineWidth="100" childItem="prmtCreator" jsvar="contCreator">
						<kd:promptBox id="prmtCreator" disabled="true" converter="objectValueConverter" jsvar="prmtCreator" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.creator}" />
					</kd:labelContainer>						
				</layout:cell>	
				<layout:cell  colspan="1" rowspan="1">	
					<kd:labelContainer id="contCreateTime" width="260" disabled="false" caption="创建时间" lineWidth="100">
						<w:dateField id="kDDateCreateTime" disabled="true" jsvar="kDDateCreateTime" value="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean.model.createTime}" />
					</kd:labelContainer>			
				</layout:cell>	
				<layout:cell  colspan="1" rowspan="1">					
				</layout:cell>						
			</layout:panelGrid>
	    </ui:define>	
		<ui:define name="innerAjaxActions">
			<biz:billEditInnerAjaxAction beanName="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean}"></biz:billEditInnerAjaxAction>
		</ui:define>	
		<ui:define name="inner-window">	
			<biz:innerWindow beanName="#{custom.aoyuan.aytime.bizbill.OTBillEditUIBean}"></biz:innerWindow>
			<w:form id="ajaxsubmitForm">
				<w:button id="ajaxsubmitButton" value="click me" style="display:none" />
			</w:form>
		</ui:define>	
	</ui:composition>			
</f:view>		
